using System;
using System.Collections;
using System.ComponentModel;
using System.Runtime.Serialization;


namespace Entities
{
    [Serializable]
    [System.Data.Services.Common.DataServiceKey("ID")]
    public class OrderDetail:EntityBase
    {
        #region OrderDetail Properties
        private System.Int32? _OrderID;
		[DataMember] public virtual System.Int32? OrderID
		{
			get
			{
				return _OrderID;
			}
			set
			{
                if (_OrderID != value)
                {
                    _OrderID = value;
                    OnPropertyChanged("OrderID");
                }
			}
		}
        private System.Int32? _ProductID;
		[DataMember] public virtual System.Int32? ProductID
		{
			get
			{
				return _ProductID;
			}
			set
			{
                if (_ProductID != value)
                {
                    _ProductID = value;
                    OnPropertyChanged("ProductID");
                }
			}
		}
        private System.Double? _Price;
		[DataMember] public virtual System.Double? Price
		{
			get
			{
				return _Price;
			}
			set
			{
                if (_Price != value)
                {
                    _Price = value;
                    OnPropertyChanged("Price");
                }
			}
		}
        private System.Int32? _Amount;
		[DataMember] public virtual System.Int32? Amount
		{
			get
			{
				return _Amount;
			}
			set
			{
                if (_Amount != value)
                {
                    _Amount = value;
                    OnPropertyChanged("Amount");
                }
			}
		}
        private System.Double? _SaleOff;
		[DataMember] public virtual System.Double? SaleOff
		{
			get
			{
				return _SaleOff;
			}
			set
			{
                if (_SaleOff != value)
                {
                    _SaleOff = value;
                    OnPropertyChanged("SaleOff");
                }
			}
		}
        private System.DateTime? _CreateDate;
		[DataMember] public virtual System.DateTime? CreateDate
		{
			get
			{
				return _CreateDate;
			}
			set
			{
                if (_CreateDate != value)
                {
                    _CreateDate = value;
                    OnPropertyChanged("CreateDate");
                }
			}
		}
        #endregion
        public override bool Equals(object obj)
        {
            if (obj == this) return true;
            if (obj == null) return false;
            if (obj is OrderDetail)
            {
                return (this.ID == (obj as OrderDetail).ID);
            }
            return false;
        }
        public override int GetHashCode()
        {
            return ID.GetHashCode();
        }
    }
}